﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Piao
{
    public static class Global
    {
        public const string DataTableName = "STATION_CODE_MAP";
        public const string DataComlumnChineseName = "ChineseName";
        public const string DataComlumnCodeName = "CodeName";
        public const string DataComlumnPinYin = "PinYin";
        public const string DataComlumnDisplayText = "DisplayText";

        static Global()
        {
            StationNameDict = new SortedDictionary<string, string>();

            TrainCodeList = new List<JsonObject>();
            TicketCodeList = new List<JsonObject>();


            StationNameTable = new DataTable(DataTableName);
            StationNameTable.Columns.Add(DataComlumnChineseName);
            StationNameTable.Columns.Add(DataComlumnCodeName);
            StationNameTable.Columns.Add(DataComlumnPinYin);
            StationNameTable.Columns.Add(DataComlumnDisplayText);

            StationNameTable.Rows.Add(StationNameTable.NewRow());
        }

        /// <summary>
        /// Key is code and value is chinese name .
        /// </summary>
        public static SortedDictionary<string, string> StationNameDict { get; private set; }



        public static DataTable StationNameTable { get; private set; }

        /// <summary>
        /// Train code. 
        /// </summary>
        public static List<JsonObject> TrainCodeList { get; private set; }


        public static List<JsonObject> TicketCodeList { get; private set; }


        /// <summary>
        /// Seat types
        /// </summary>
        public static List<JsonObject> SeatTypeTargets = new List<JsonObject>();
    }



}
